/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.park.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicModDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * 值班排班管理
 *
 * @author pig
 * @date 2024-01-23 13:30:38
 */
@Data
public class BaseShiftQueueVO{

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 排班日期
     */
    @Schema(description = "排班日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date shiftDate;

    /**
     * 班次
     */
    @Schema(description = "班次")
    private Long shiftWorkId;

    /**
     * 值班人员
     */
    @Schema(description = "值班人员")
    private Long shiftUserId;

    /**
     * 联系电话
     */
    @Schema(description = "联系电话")
    private String phone;

    /**
     * 岗位
     */
    @Schema(description = "岗位")
    private String post;

    /**
     * 值班人员签到时间
     */
    @Schema(description = "值班人员签到时间")
    private Date shiftSignDate;

    /**
     * 值班人员签到图片
     */
    @Schema(description = "值班人员签到图片")
    private String shiftSignPhoto;

    /**
     * 值班人员下班时间
     */
    @Schema(description = "值班人员下班时间")
    private Date shiftOffDutyDate;

    /**
     * 值班人员下班图片
     */
    @Schema(description = "值班人员下班图片")
    private String shiftOffDutyPhoto;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remarks;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private Long orgId;

    /**
     * 记录个数
     */
    @Schema(description = "记录个数")
    private Long queueRecordCount;

    public String getShiftWorkIdStr() {
        return DictResolver.getItemLabelByValue(ParkBasicModDictEnum.shift_work_info, this.shiftWorkId);

    }

    public String getShiftUserIdStr() {
        return DictResolver.getItemLabelByValue(ParkBasicModDictEnum.shift_employee_info, this.shiftUserId);

    }

}
